<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    
    <ul id="box">
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <span>span</span>
        <p>pppppp</p>
    </ul>
    <ol>
        <li>1</li>
        <li>2</li>
    </ol>
    <script>
        var  box = document.getElementById("box");//获取ul
        var lis = box.getElementsByTagName("li");
        console.log(lis);

    //    var lis = document.getElementsByTagName("li");//获取页面中所有的li
    //    console.log(lis);//页面中所有的li

    </script>
</body>
</html>